Method and apparatus for detecting pattern defects

ABSTRACT

With the objective of achieving defect kind training in a short period of time to teach classification conditions of defects detected as a result of inspecting a thin film device, according to one aspect of the present invention, there is provided a visual inspection method, and an apparatus therefor, comprising the steps of: detecting defects based on inspection images acquired by optical or electronic defect detection means, and at the same time calculating features of the defects; and classifying the defects according to classification conditions set beforehand, wherein said classification condition setting step further includes the steps of: collecting defect features over a large number of defects acquired beforehand from the defect detection step; sampling defects based on the distribution of the collected defect features over the large number of defects; and setting defect classification conditions based on the result of reviewing the sampled defects.

CLAIM OF PRIORITY

This application is a continuation of application Ser. No. 12/755,453,filed Apr. 7, 2010, now U.S. Pat. No. 7,912,276 which is a continuationof application Ser. No. 11/319,271, filed on Dec. 29, 2005, now U.S.Pat. No. 7,720,275 now allowed, which claims the benefit of JapaneseApplication No. 2005-085381, filed Mar. 24, 2005 in the Japanese PatentOffice, the disclosures of which are incorporated herein by reference.

BACKGROUND OF THE INVENTION

The present invention relates to a visual inspection method, and anapparatus, for detecting defects including minute pattern defects andparticles on the basis of an image of an object, which has been acquiredby use of lamp light, a laser beam, an electron beam, or the like, andfor classifying the defects, the visual inspection method and apparatusbeing targeted for thin film devices including a semiconductor wafer,TFT, and a photo mask. In particular, the present invention relates to avisual inspection method and an apparatus that are suitable for visualinspection of a semiconductor wafer.

Thin film devices such as a semiconductor wafer, a liquid crystaldisplay, and a magnetic head of a hard disk are manufactured throughmany fabrication processes. In the manufacturing of such thin filmdevices, with the objective of improving and stabilizing yields, visualinspection is performed for each series of processes. In the visualinspection, defects such as a pattern defect and a foreign particle aredetected on the basis of an image acquired by use of lamp light, a laserbeam, an electron beam, or the like. At the same time, there is also acase where defects are classified on the basis of features of defectssuch as the brightness and the size. For example, Japanese PatentLaid-Open No. 2002-257533 (corresponding to U.S. application Ser. No.10/050,776) discloses an inspection apparatus that classifies defectsinto particles which are convex defects and scratches which are concavedefects according to a difference in intensity between scattered lightby vertical lighting and scattered light by oblique lighting. Whendefect classification conditions of the inspection apparatus having sucha defect classification function are determined, it is necessary toinstruct classes into which defects are classified by reviewing, and todetermine the relationship between a feature and a class. In the aboveexample, the classes into which defects are classified are a particleclass and a scratch class. Accordingly, it is assumed that the intensityof scattered light at the time of vertical lighting and the intensity ofscattered light at the time of oblique lighting are features. Then, onthe basis of a two-dimensional scatter diagram, a discrimination line ismanually set.

Incidentally, other than the technique disclosed in the Japanese PatentLaid-Open No. 2002-257533 described above, techniques which are known asthe background art pertaining to the present invention include: thetechnique disclosed in Japanese Patent Laid-Open No. 2004-47939; thetechnique disclosed in Japanese Patent Laid-Open No. 2003-59984(corresponding to U.S. Pat. No. 6,876,445 B2); the technology disclosedin Japanese Patent Laid-Open No. 2004-117229 (corresponding to U.S.application Ser. No. 10/672,010); and the technique disclosed in the13th workshop on automation of visual inspection, pp. 99-104 (December,2001).

As far as the visual inspection of semiconductor wafers are connected,as a result of the miniaturization of patterns, the size of a targetdefect to be detected becomes smaller, and the number of detecteddefects increases to a level ranging from several thousand to tens ofthousands. Therefore, because it is practically impossible to review alldefects, it is necessary to sample defects, the number of which is fromseveral tens to several hundreds, before the sampled defects arereviewed. However, when defects are sampled at random, if a defectoccurrence ratio deviates from the usual, the same kind of defects aremainly selected, resulting in the unclear relationship between a featureand a class. Accordingly, classification conditions cannot be correctlyset, which was a problem to be solved.

SUMMARY OF THE INVENTION

The present invention has been made to solve the above mentionedproblem, and an object of the present invention is to provide a visualinspection method, and an apparatus, which are capable of correctlysetting classification conditions even if a defect occurrence ratiodeviates from the usual.

In order to achieve the above mentioned object, according to one aspectof the present invention, there is provided a visual inspection method,and an apparatus therefor, comprising the steps of: on the basis ofinspection images acquired by optical or electronic defect detectionmeans, detecting defects by comparison inspecting, and at the same timecalculating features of the defects; and classifying the defectsaccording to classification conditions set beforehand by classificationcondition setting means; wherein the classification condition settingmeans further comprises the steps of: collecting defect features cover alarge number of defects acquired beforehand from the defect detectionmeans; sampling defects on the basis of the distribution of thecollected defect features over the large number of defects; and settingdefect classification conditions on the basis of the result of reviewingthe sampled defects.

According to another aspect of the present invention, there is provideda visual inspection method, and an apparatus therefor, comprising thesteps of: setting classification conditions beforehand; detectingdefects by using inspection images acquired by imaging a targetsubstrate, and calculating features of the detected defects; andclassifying the defects on the basis of the classification conditionsset beforehand in the classification condition setting step by using thedefect features calculated in the defect detection step; wherein: theclassification condition setting step further includes the steps of:detecting a large number of defects by using inspection images acquiredby imaging the target substrate, and calculating feature of each defectover the large number of detected defects, and collecting the calculatedfeature of the each defect over the large number of defects to store thecollected features; creating defect feature distribution indicatingdefect occurrence distribution based on the defect feature of the eachdefect over the large number of defects collected in the collectionstep, and performing sampling review defects based on the created defectfeature distribution; and giving at least defect classes to a pluralityof review defects by reviewing for the review defects sampled in thedefect sampling step; wherein the defect classes of the review defectsgiven in the review step for the features of the review defectscollected in the collection step, are set as training (teaching) data ofthe classification conditions.

In addition, according to the present invention, in the defect samplingstep, a desired one-dimensional feature histogram over a large number ofdefects is created as the defect feature distribution, and sampling isperformed so that in the created desired one-dimensional featurehistogram, number of samples from each of sections into which theone-dimensional feature histogram is divided with respect to thefeatures becomes roughly equal with the sections where section in wheresampling defect doesn't become to exist is excepted.

Moreover, according to the present invention, in the defect samplingstep, a desired two-dimensional feature space over a large number ofdefects is created as the defect feature distribution, and the samplingis performed so that in the created desired two-dimensional featurespace, which is divided into cells of a lattice with respect to thefeatures, number of samples included in each cell of the lattice becomesroughly equal with the exception of cells of the lattice where cell ofthe lattice in where the sampling defect doesn't become to exist isexcepted.

Further, according to the present invention, the defect sampling stepfurther includes the steps of: creating a plurality of featurehistograms over a large number of defects as the defect featuredistribution; and displaying the plurality of feature histograms createdin the creation step; and selecting one feature histogram from among theplurality of feature histograms displayed in the displaying step, andperforming sampling so that number of samples from each of featuresections which have been freely set in the selected one of the featurehistograms becomes roughly equal with feature sections where featuresection in where the sampling defect doesn't become to exist isexcepted.

Still further, according to the present invention, in the collectionstep, the collected defect feature of the each defect include featurebased on defect images, and feature based on position coordinates ofdefects.

According to still another aspect of the present invention, there isprovided a visual inspection method, and an apparatus therefor,comprising the steps of: setting classification conditions beforehand;detecting defects by using inspection images acquired by imaging atarget substrate, and calculating features and position information ofthe detected defects; and classifying the defects in accordance with theclassification conditions set beforehand in the classification conditionsetting step by using the features and the position information of thedefects calculated in the defect detection step; wherein: theclassification condition setting step further includes the steps of:detecting a large number of defects by using inspection images acquiredby imaging a target substrate, and calculating features and positioninformation of the large number of detected defects, and collecting thecalculated features and position information of each defect over thelarge number of defects; extracting clusters on the basis of theposition information of the large number of defects to store thecollected feature and position information of the each defect; and fordefects except the extracted clusters, creating defect featuredistribution indicating defect occurrence distribution based on thedefect feature of each defect over the large number of defects collectedin the collection step, and performing sampling review defects based onthe created defect feature distribution; and giving at least defectclasses to a plurality of review defects by reviewing for the reviewdefects sampled in the defect sampling step; wherein for the defectsexcept the extracted clusters, the defect classes of the review defectsgiven in the review step for the features of the review defectscollected in the collection step, are set as training data of theclassification conditions.

According to the present invention, it is possible to equally review andteach defects of each class irrespective of an occurrence ratio of themby performing sampling of defects on the basis of the distribution ofdefect features. Therefore, it is possible to correctly keep track ofthe relationship between a defect class and a feature only with a smallnumber of reviews, and thereby to set classification conditions thatwill produce correct results.

These and other objects, features and advantages of the invention willbe apparent from the following more particular description of preferredembodiments of the invention, as illustrated in the accompanyingdrawings.

BRIEF DESCRIPTION OF THE DRAWINGS

FIG. 1 is a diagram schematically illustrating a configuration of avisual inspection apparatus according to one embodiment;

FIG. 2 is a plan view illustrating a semiconductor wafer as a targetsubstrate;

FIG. 3 is a diagram illustrating one embodiment of a classificationmethod used in a visual inspection apparatus;

FIG. 4 is a diagram illustrating another embodiment of a classificationmethod used in a visual inspection apparatus;

FIG. 5A is a graph illustrating the result of random sampling performedin a case where defect features are one-dimensional, and FIG. 5B is agraph illustrating the result of feature space equalization samplingperformed in a case where defect features are one-dimensional;

FIG. 6 is a flowchart illustrating the process flow of a defect samplingmethod according to a first embodiment;

FIG. 7 is a diagram illustrating an embodiment of a defect samplingmethod in which features are two-dimensional;

FIG. 8 is a diagram illustrating an embodiment of a histogram in whichfeatures are shown on a defect class basis;

FIG. 9 is a diagram illustrating an embodiment of a GUI through whichfeature sections are manually set according to a defect sampling method;

FIG. 10A is a diagram illustrating an example of a wafer map in whichdensely located defects exist, FIG. 10B is a diagram illustrating anexample of a wafer map in which linear defects exist, and FIG. 10C is adiagram illustrating an example of a wafer map in which circular arcshaped defects exist;

FIG. 11 is a diagram illustrating one embodiment of a systemconfiguration that includes a classification condition setting unit; and

FIG. 12 is a diagram illustrating an embodiment of a GUI through whichreview images are inputted and manually classified.

DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS

Embodiments of a visual inspection method and an apparatus according tothe present invention will be described with reference to drawings.

First Embodiment

First of all, a first embodiment of a visual inspection method and anapparatus according to the present invention will be described in detailwith reference to FIGS. 1 through 8.

A first embodiment of an optical visual inspection apparatus targetedfor semiconductor wafers will be described. FIG. 1 is a diagramillustrating a configuration of an optical visual inspection apparatusaccording to the first embodiment of the present invention. The opticalvisual inspection apparatus is configured to include a stage 12 to placea target substrate 11 such as a semiconductor wafer thereon and to bemoved, and a detector 13. The detector 13 comprises: a light source 101emitted a light beam for irradiating a illumination light beam onto thetarget substrate 11; an illumination optical system 102 for condensingthe light beam emitted from the light source 101; an objective lens 103for irradiating the target substrate 11 with the illumination light beamcondensed by the illumination optical system 102 and for imaging anoptical image obtained by reflecting from the target substrate 11; andan image sensor 104 for converting the focused optical image into animage signal in response to the brightness. Reference numeral 14 denotesan image processor that detects a defect candidate on the target waferby use of the image detected by the detector 13.

For example, as described in Japanese Patent Laid-Open No. 2002-257533,the light source 101 includes a plurality of light sources each emittingan UV light beam, or a DUV light beam that has different wavelength in.The illumination optical system 102 includes: a high angle illumination(vertical lighting) optical system that irradiates an object to beinspected with the UV light beam or the DUV light beam, which has beenemitted from one of the light sources, from a high angle direction whichis a normal line direction or approximates to the normal line directionwith respect to a surface of the object to be inspected; and a low angleillumination (oblique lighting) optical system that irradiates an objectto be inspected with the UV light beam or the DUV light beam, which hasbeen emitted from another light source, from a low angle directionangular to the surface of the object to be inspected. The image sensor104 includes a plurality of sensors, one of which is used for high angleillumination, and the other of which is used for low angle illumination.A beam splitter is placed between the objective lens 103 and the imagesensor 104. Incidentally, by making a position to be irradiated at ahigh angle differ from a position to be irradiated at a low angle in avisual field of the objective lens 103, it is possible to make awavelength of a high angle illumination light beam coincide with that ofa low angle illumination light beam. However, it is necessary to adjusta light receiving surface of each of the image sensors so as toaccommodate differences in positions to be irradiated on the surface ofthe object to be inspected.

The image processor 14 comprises: an AD converter 105 for converting,into a digital signal, an input signal coming from the image sensor 104of the detector 13; a preprocessor 106 for performing image correctionof the digital signal that has been analog-to-digital converted, theimage correction including shading correction and darkness levelcorrection; a delay memory 107 for storing, as a reference image signal,a digital signal to be compared; a displacement detector 108 fordetecting the amount of displacement between the digital signal(detected image signal) detected by the detector 13 and the referenceimage signal stored in the delay memory 107; an image comparison unit109 for comparing a detected image f (x, y), which is aligned on thebasis of the amount of displacement detected by the displacementdetector 108, with an image signal of a reference image g (x, y), andthen for outputting, as a defect candidate, part whose difference valuesub (x, y) is larger than a specific threshold value Th; a featureextraction unit 110 for calculating position coordinates, and a feature,of the defect candidate; and a defect classification unit 111 forclassifying a defect on the basis of the feature.

A total control unit 15 is configured to include a CPU (not illustrated)that performs various kinds of control. A storage device 112 and a userinterface 113 are connected to the total control unit 15. The storagedevice 112 stores an ID (including position coordinates) of a defectcandidate calculated by the feature extraction unit 110, a feature ofthe defect candidate, an inspection image of the defect candidate, andthe like. The user interface 113 accepts a request by a user to changean inspection parameter, and displays information about a detecteddefect. A mechanical controller 1101 drives and controls the stage 12 onthe basis of a control instruction sent from the total control unit 15.It is to be noted that, although not illustrated, the image processor14, the detector 13, and the like, are also driven and controlled byinstructions sent from the total control unit 15.

The total control unit (collection unit) 15 is required to collect, inadvance, position coordinate information of each defect, and features ofeach defect, over a large number of defects acquired from the featureextraction unit 110, and then to store them in the storage device 112.As a result, a defect sampling unit 115 can select review defects on thebasis of the position coordinate information of each defect, and thefeatures of each defect, over the large number of defects acquired fromthe total control unit (collection unit) 15. Moreover, a classificationcondition setting unit 116 can set beforehand classification conditionsused for the defect classification unit 111 on the basis of the featureof each review defect acquired through the total control part 15 and theresult of reviewing each review defect acquired from the review tool1103. Thus, classification condition setting means comprises: the defectsampling unit 115; the classification condition setting unit 116; andinput means for inputting the review result from the review tool 1103,including the total control unit (collection unit) 15.

Next, a defect detection method carried out by a visual inspectionapparatus shown in FIG. 1 will be described.

As shown in FIG. 2, a large number of chips, each of which is expectedto have the same pattern, are regularly arranged in rows on thesemiconductor wafer 11 that is a target substrate. The image comparisonunit 109 compares two images on two chips that are adjacent to eachother, each of the two images being located at the same position on eachof the two chips. For example, the image comparison unit 109 compares animage corresponding to an area 21 on a chip with an image correspondingto an area 22 on its adjacent chip shown in FIG. 2, and thereby detects,as a defect, part in which there is a difference between both of theimages.

If its workings are described, the total control unit 15 successivelymoves the semiconductor wafer 11 as a target substrate by use of thestage 12, for example, in a direction opposite to a scan A directionshown in FIG. 2. In synchronization with the successive move of thestage 12, the detector 13 successively detects an optical image of thetarget substrate 11 in the scan A direction by use of the image sensor104, and then captures an image of the chip. The image sensor 104 of thedetector 13 outputs the inputted signal to the image processor 14.

In the image processor 14, the AD converter 105 converts the inputtedanalog signal into a digital signal, and then the preprocessor 106performs shading correction, darkness level correction, and the like.Into the displacement detector 108, the following two signals areinputted as a set: an image signal (detected image signal) of a chip tobe inspected which is output from the preprocessor 106; and an imagesignal delayed by a period of time during which the stage moves throughthe distance between chips, the image signal being inputted from thedelay memory 107, that is to say, an image signal of a chip just beforethe chip to be inspected (reference image signal).

The displacement detector 108 calculates the amount of displacement by apixel unit or less. The displacement is caused by, for example,vibrations of the stage during the move between the two images that areinputted in succession. At this time, although the detected image signaland the reference image signal are inputted in succession, the amount ofdisplacement is successively calculated on a processing unit basis; inthis case, the processing unit is a specific length.

The image comparison unit 109 uses the calculated amount of displacementto align the images, and then compares the detected image f (x, y) andthe reference image g (x, y), which have been aligned. The imagecomparison unit 109 thereby outputs, as a defect candidate, an areawhose difference value sub (x, y) is larger than the specific thresholdvalue Th.

The feature extraction unit 110 edits each of defect candidates; forexample, erasing a small defect candidate as a noise, merging adjacentdefect candidates as one defect, and the like. Then, the featureextraction unit 110 calculates features such as a position, the area,and the size, in a wafer, and other features (a brightness value (agray-scale value) and a brightness shape) used for the classification ofdefects.

The defect classification unit 111 classifies the defects usingclassification conditions set beforehand by the classification conditionsetting unit 116, and then outputs class information of each defect. Theinformation is stored in the storage device 112. Further, theinformation is presented to users through the user interface 113.

As a defect classification method carried out by the defectclassification unit 111, it is thought that, for example, as shown inFIG. 3, defects are classified according to a discrimination line whichis set on the basis of a scatter diagram illustrating two-dimensionalfeatures. In addition, as shown in FIG. 4, there is also a method inwhich defects are classified according to class decision rules describedwith if-then-else. In this case, decision rules are expressed bythreshold values for features. In an example shown in FIG. 4, first ofall, attention is paid to the area of a defect. If the area is 100 ormore, the defect is classified as a major defect. On the other hand, ifthe area is smaller than 100, attention is next paid to black-and-whitepolarity that is a brightness value of the defect. If theblack-and-white polarity is white, the defect is classified as a whitedefect, whereas if the black-and-white polarity is black, the defect isclassified as a black defect. Besides the above methods, for example,there is a method in which a defect is classified into a training defectclass whose distance on feature space is the shortest; and there is alsoa method in which feature distribution of each defect class is estimatedon the basis of training data, and then a defect is classified into aclass whose occurrence probability of a feature of the defect to beclassified is the highest.

Next, review defect sampling performed by the defect sampling unit 115,or the like, and classification condition settings performed in theclassification condition setting unit 116, or the like, according to thepresent invention, will be described with reference to FIGS. 5 through7. The review defect sampling and the classification condition settingsare performed with the objective of setting as training data (teachingdata) of classification conditions on the basis of position coordinateinformation, and features, of each of a large number of defects. Here,the large number of defects are collected beforehand from the featureextraction unit 110 and are then stored in the storage device 112 by thetotal control unit (collection unit) 15.

FIGS. 5A, 5B are diagrams each illustrating a defect sampling methodaccording to the present invention with a case where features areone-dimensional being taken as an example. In each of FIGS. 5A, 5B, ahistogram whose horizontal axis indicates features, and whose verticalaxis indicates the occurrence frequency, is shown. Here, it is assumedthat defects include particles and scratches, and that the defects havenormal distribution as shown in the figures. However, in actuality, itis not possible to discriminate between the particles and the scratchesbefore reviewing.

FIG. 5A shows the result of random sampling. In the case of the randomsampling, the distribution of review defects keeps the originaloccurrence ratio. Accordingly, the result is as shown with oblique linesin FIG. 5A. To be more specific, if the original occurrence frequency isbiased, only one kind of defects (particles) will be mainly reviewed.

For this reason, according to the present invention, as shown withoblique lines in FIG. 5B, by performing sampling so that thedistribution of review defects becomes as uniform as possible, itbecomes possible to review the other kind of defects (scratches). Thissampling technique shown in FIG. 5B will be hereinafter called featurespace equalization sampling.

Next, a process flow of how to perform the feature space equalizationsampling according to the present invention will be described withreference to FIG. 6. First of all, for example, using the user interface113, the number of samplings (that is to say, the number of reviews)which is smaller than the number of defects is inputted into the defectsampling unit 115 so that the number of samplings is set (S61). At thistime, if the number of reviews (the number of samplings) which has beenset is larger than the number of defects that has been extracted andthen has been stored in the storage device 112 by the feature extractionunit 110, all defects have only to be reviewed. Accordingly, the defectsampling part 115 judges that sampling is not required. Therefore, ifsampling information including defect IDs and position coordinates overall defects stored in the storage device 112 are output as a file to,for example, the storage device 112, it is possible to provide thereview tool 1103 with the sampling information.

Next, on the basis of features of all defects extracted by the featureextraction unit 110, the defect sampling unit 115 determines a range inwhich the features are distributed (in other words, a minimum value anda maximum value) (S62). Next, the defect sampling unit 115 determines anappropriate initial value of N such that 2 to the Nth power becomessmaller than the number of samplings which has been set (S63).

Next, the defect sampling unit 115 calculates a histogram with eachsection (the width is W) being provided by dividing the differencebetween the minimum value and the maximum value of the determinedfeatures into equal parts, the number of which is 2 to the Nth power(S64). At this time, the defect sampling unit 115 stores which defect(defect IDs) included in each section. Next, on the basis of the storeddefect IDs included in each section, one is sampled at random for eachsection (the width is W) except section in where sampling defect doesn'tbecome to exist (S65). Then, a judgment is made as to whether or not theremaining number of samplings is larger than 2 to the Nth power (S66).If the remaining number of samplings is larger than 2 to the Nth power,the step S65 is repeated.

As a result of the steps described above, until the remaining number ofsamplings becomes smaller than 2 to the Nth power, sampling can beequally performed at random for each of sections where section in wherethe sampling defect doesn't become to exist is excepted from all of thesections (each having the width W), each of which is provided bydividing a range in which the features are distributed (the differencebetween the minimum value and the maximum value) into equal parts, thenumber of which is 2 to the Nth power.

Next, if it is judged in the step S66 that the remaining number ofsamplings becomes smaller than 2 to the Nth power, N is decremented byone, and the width of a section to be sampled is doubled (2W) (S67).Next, a judgment is made as to whether or not the remaining number ofsamplings is 0 (S68). If the remaining number of samplings is not 0, theprocess returns to the step S64 where the above range is divided intoequal parts so that each of the equal parts has the doubled width (2W),and then the histogram is recalculated (S64). At this time, which defect(defect IDs) of remaining defects being included in each section (thewidth is 2W) is stored. Incidentally, the histogram can be easilyrecalculated because what is required is only to combine two sections ofthe original histogram into one section.

Next, on the basis of the remaining defect IDs included in each section(the width is 2W), which have been stored, one is sampled at random foreach of the sections (each having the width 2W) where section in wherethe sampling remaining defect doesn't become to exist is excepted (S65).Then, a judgment is made as to whether or not the remaining number ofsamplings is larger than 2 to the (N−1)th power (S66). If the remainingnumber of samplings is larger than 2 to the (N−1)th power, the step S65is repeated. If the remaining number of samplings is smaller than 2 tothe (N−1)th power, N is further decremented by one, and the width of asection to be sampled is doubled again (4W) (S67). Then, the steps S64through S67 are repeated until the remaining number of samplings becomes0. The sampling is completed at the point of time when the remainingnumber of samplings becomes 0.

As a result of the steps described above, the width of each equal partinto which the feature distribution range is divided is doubled,quadrupled, and the like, until the remaining number of samplingsbecomes 0. This makes it possible to perform sampling substantiallyequally, and at random, for each of sections where section in where thesampling remaining defect doesn't become to exist is excepted. As amatter of course, after the second execution of the S65, defect that hasnot yet been sampled is targeted.

Incidentally, the defect sampling unit 115 used in the above-mentionedclassification condition settings is configured to create a plurality ofone-dimensional feature histograms as defect feature distribution, andto display the plurality of created one-dimensional feature histogramson the user interface 113, and then to select a desired one-dimensionalfeature histogram from among the plurality of displayed one-dimensionalfeature histograms.

In addition, if features of defects over all defects extracted by thefeature extraction unit 110 are two-dimensional, a scatter diagram asshown in FIG. 7 is adopted. In this case, a feature distribution rangeis divided into cells of a lattice, and defects included in each cellare examined in advance. If the lattice is divided into cells, thenumber of which is 2 to the Nth power, such as 2×2, 4×4, 8×8, 16×16, . .. , then by using the same processing as that in the case of theone-dimensional features, the number of review defects (the number ofsamplings) included in each cell of the lattice can be madesubstantially equal with cells of the lattice where cell of the latticein where the sampling defect doesn't become to exist is excepted. It ismore preferable to provide, before the step S65, a step of countingexisting sampling defects in each scale (each section, or each cell ofthe lattice, into which the lattice is divided by 2 to the Nth power)for adjustment.

Moreover, if features of defects over all defects extracted by thefeature extraction unit 110 are three-dimensional or more, the similarprocessing can also be used by defining a multidimensional lattice.However, because the number of cells of the lattice increases,calculation becomes complicated. Accordingly, the three dimensions ormore are reduced to two dimensions by use of a multivariate analysistechnique such as the K-L (Karhunen-Loeve) expansion and self-organizingmapping, and then the similar processing is performed. Further, it mayalso be so configured that scatter diagrams are displayed with allcombinations of two features, and then a selection is made from amongthem.

To be more specific, the defect sampling unit 115 used in theclassification condition settings creates a plurality of feature scatterdiagrams as the defect feature distribution, and displays the pluralityof created feature scatter diagrams on the user interface 113, and thenselects the desired two-dimensional feature space from among theplurality of displayed feature scatter diagrams. Here, the desiredtwo-dimensional feature space may also be space into which thethree-dimensional feature space or more is converted intotwo-dimensional feature space by compression.

Additionally, as described above, it may also be so configured that allfeatures are displayed using histograms, and that one of the histogramsis then selected from among them so as to perform the feature spaceequalization sampling for one dimension.

In all of the above methods, after inspection, according to aninstruction from the user interface 113, the defect sampling unit 115performs sampling of review defects on the basis of feature datacorresponding to the number of samplings and defect IDs that areinputted from, for example, the total control unit 15. The defectsampling unit 115 then outputs, as sampling information, a filecontaining defect IDs and position coordinates of defects to bereviewed, to for example the storage device 112. As a result, the defectsampling unit 115 can provide the review tool 1103 with the reviewdefect IDs and position coordinates thereof, which have been stored inthe storage device 112, as sampling information. Incidentally, in thecase of full automation, if the total control unit 15 sets beforehand asampling mode for the defect sampling unit 115 on the basis of aninspection recipe, the defect sampling unit 115 may also perform thesampling immediately after the inspection.

Next, how the classification condition setting unit 116 setsclassification conditions for the defect classification unit 111through, for example, the total control unit 15 will be described.According to an instruction from the user interface 113, theclassification condition setting unit 116 sets classification conditionsin a state in which defect class information exists. The defect classinformation is acquired when the review tool 1103 reviews acorresponding wafer according to sampling information supplied from thedefect sampling unit 115. If the defect class information does notexist, the classification condition settings are not performed. Aclassification condition setting method differs depending on a defectclassification method. Incidentally, the classification conditionsetting unit 116 then receives defect IDs, defect class information,review defect images, and the like, which are the result of reviewing bythe review tool 1103.

For example, as shown in FIG. 3, when classifying defects according to adiscrimination line that is set in the two-dimensional feature space,the classification condition setting unit 116 displays a scatter diagramon the user interface 113 through the total control unit 15 by use ofthe defect class information of the defect IDs acquired from the reviewtool 1103, and by use of the feature information of the defect IDsextracted by the feature extraction unit 110. Then, for example, astraight line with inclination 1 is displayed. The inclination andintercepts are adjusted with cursor keys to determine the discriminationline, which is stored in the storage device 112.

In addition, as shown in FIG. 4, when classifying defects according toclass decision rules described with if-then-else, the classificationcondition setting unit 116 displays a histogram as shown in FIG. 8 onthe user interface 113 through the total control unit 15. In thehistogram, for all features extracted by the feature extraction unit110, different defect classes are expressed in different colors (thedifferent defect classes may also be acquired from the review tool 1103if necessary).

While viewing the displayed histogram, a user manually describes a classdecision rule, and then inputs the class decision rule into the totalcontrol unit 15 through the user interface 113. The total control unit15 provides the classification condition setting unit 116 with thedescribed class decision rule as classification conditions. Moreover,the user interface 113 is configured to allow users to use buttonoperation for selection of a feature amount, selection of a defect classname, setting of a threshold value by moving a boarder line in thehistogram, and selection between (larger than or equal to) and (smallerthan or equal to). According to the input by the user, theclassification condition setting unit 116 creates class decision rulesas classification conditions.

Further, on the basis of position coordinates, feature information,defect images, and the like, of defect IDs extracted by the featureextraction unit 110, and on the basis of defect IDs, defect classinformation, review defect images, and the like, which are acquired fromthe review tool 1103, the classification condition setting unit 116 canalso automatically create class decision rules as classificationconditions by use of, for example, the decision tree algorithm describedin Japanese Patent Laid-Open No. 2004-47939.

In addition, if a learning type classification technique is adopted, theclassification condition setting unit 116 follows the technique tolearn, as training samples (teaching samples), defect class informationacquired from the review tool 1103 and defect feature informationextracted by the feature extraction unit 110, and then outputs, as afile, classification conditions to the storage device 112. Here, whenthe distribution of defect class is estimated on the basis of thetraining samples, as shown in FIG. 5B, distribution that differs fromtrue distribution is determined. If it is thought that this will exert abad influence upon the classification performance, the bad influence canbe avoided by giving weight to the training samples using (the number ofdefects existing in a feature section to which the training samplesbelong/the number of training in the section) before learning.

Second Embodiment

Next, a second embodiment of a visual inspection method and an apparatusaccording to the present invention will be described with reference toFIG. 9. A point of difference between the first and second embodimentsis that a processing method carried out by the defect sampling unit 115in the second embodiment differs from that in the first embodiment. Inthe first embodiment, sections are full automatically andsemiautomatically set in the feature space. However, sections aremanually set in the second embodiment. This method will be described asbelow.

According to an instruction from the user interface 113 afterinspection, the defect sampling unit 115 inputs feature data of eachdefect corresponding to each defect ID that has been extracted and thenhas been stored in the storage device 112 by the feature extraction unit110. Next, the defect sampling unit 115 creates a histogram illustratingfeatures of defects, and then displays the histogram on the userinterface 113.

FIG. 9 illustrates an example of a display screen displayed in a casewhere the number of defect features is three. 901 a, 901 b, 901 c arehistograms illustrating defect features α, β, γ respectively. Thehorizontal axis indicates features, whereas the vertical axis indicatesthe occurrence frequency. 902 a, 902 b, 902 c are check buttons, each ofwhich indicates whether or not a feature of each defect is selected.Here, it is assumed that only one can be selected. The user selects anyone of the defect features by clicking a button.

In the example shown in the figure, the defect feature β is selected. Inthis manner, it is desirable to select a feature whose distribution hasa plurality of peaks. If a defect feature is selected, a correspondingarea count input box 903 b is activated. 2 is set as a default value;and a borderline 904 is displayed at a position at which the histogramis divided into two equal parts. If a value inputted into the area countinput box 903 b changes, the number of displayed borderlines 904 alsochanges. Users can freely determine a feature section of defects bydragging and moving the borderline 904. By inputting the number ofsamples (the number of samplings that is the number of reviews) into asample count input box 905 before an OK button 906 is clicked, thedefect sampling unit 115 performs sampling of review defects so that thenumber of samples in each section becomes roughly equal with sectionswhere section in where the sampling defect, each of which includes nodefect to be sampled. Then, the defect sampling unit 115 outputs, as afile, defect Ds to for example the storage device 112.

To be more specific, the defect sampling unit 115 used in theclassification condition settings executes the steps of: creating, asthe defect feature distribution, a plurality of feature histograms overa large number of defects; displaying the plurality of created featurehistograms on the user interface 113; selecting one feature histogramfrom among the plurality of displayed feature histograms; and performingsampling so that the number of samples from the feature section, whichhas been freely set in the one selected feature histogram, becomesroughly equal with sections where section in where the sampling defectdoesn't become to exist is excepted. Then, if a user wants to end theprocessing without performing the sampling, the user clicks a cancelbutton 907.

In the visual inspection apparatus, if not only feature data of defectsextracted by the feature extraction unit 110 but also inspection imagesof the defects are stored in the storage device 112, when the defectsampling unit 115 samples review defects so that the number of samplesin each section becomes roughly equal with sections where section inwhere the sampling defect doesn't become to exist is excepted, itbecomes possible to support a judgment made by the user using the defectinspection images. In such a case, when any one of defect features isselected by clicking one of the check buttons 902, the defect inspectionimages are displayed by sorting with values of the defect features.Incidentally, when the inspection images of defects are displayed, thedivisions of the sections based on the borderlines 904 shown in thehistogram are also made to recognize.

Third Embodiment

Next, a third embodiment of a visual inspection method and an apparatusaccording to the present invention will be described with reference toFIGS. 10A, 10B, 10C. Paying attention to the third embodiment, a pointof difference between the first and second embodiments is that aprocessing method carried out by the defect sampling unit 115 in thethird embodiment differs from that in the first and second embodiments.In the first and second embodiments, sampling is performed on the basisof defect features based on detected image information. However, in thethird embodiment, sampling is performed by use of position informationof defects in combination with the above-mentioned defect features.

First of all, a first method in the third embodiment will be described.In the first method, the defect position information used in combinationwith the defect features is the shortest distance from the adjacentdefect, the local defect density and the like, calculated by using, forexample, the method described in “Visual inspection technique usingdefect point sampling technology” the 13th workshop on automation ofvisual inspection, pp. 99-104 (December, 2001) on the basis ofcoordinates of all defects after inspection. Here, the first method is amethod in which, in combination with the defect features based on theabove image information, defect position information including theshortest distance from the adjacent defect and the local defect densityis used for sampling with the number of dimensions of the defectfeatures being increased.

Next, a second method in the third embodiment will be described. As faras the second method is concerned, processing method carried out by theclassification condition setting unit 116 is also different from thatdescribed in the first and second embodiments.

To be more specific, in the second method, first of all, on the basis ofposition coordinates of defects extracted by the feature extraction unit110, the defect sampling unit 115 analyzes how the defects aredistributed, and thereby detects densely located defects, lineardefects, and circular arc shaped defects as shown in wafer maps in FIGS.10A, 10B, 10C, respectively. In this case, the analyzing method of thedefect distribution state uses the method described in Japanese PatentLaid-Open No. 2003-59984 or Japanese Patent Laid-Open No. 2004-117229.The densely located defects are detected by grouping together eachdefect whose distance from another defect is shorter than apredetermined threshold value. The linear defects are defects that aredensely distributed in the shape of a straight line; and the circulararc shaped defects are defects that are densely distributed in the shapeof a circular arc.

Such characteristic distribution is generically called a cluster. It isempirically understood that defects constituting a cluster may also beconsidered to belong to the same kind of defects. For this reason, thedefect sampling unit 115 samples a few defects from each cluster tocheck (confirm) defect class (defect kind), and then presents IDs andposition coordinates of the sampled review defect onto the review tool1103, and the review tool 1103 reviews the presented defects. Inaddition, for defects that do not constitute a cluster, the defectsampling unit 115 samples the defects by the method described in thefirst embodiment or in the second embodiment. In this case, the defectsconstituting the cluster are not included in the calculation of thehistogram.

Next, the classification condition setting unit 116 regards all of thedefects constituting the cluster as defects in the same class so thatsamples which have not been reviewed are also used as training data(teaching data). In another case, the defects constituting the clusterare excluded as defects belonging to a particular class, and thereviewed samples are also not used as training samples (teachingsamples). The other points are similar to the first and secondembodiments.

Fourth Embodiment

Next, a fourth embodiment of a visual inspection method and an apparatusaccording to the present invention will be described with reference toFIGS. 11, 12. In the first, second and third embodiments, the visualinspection apparatus is configured to include the defect sampling unit115 and the classification condition setting unit 116. However, in thefourth embodiment, these means 115, 116 are separately configured as aclassification condition setting apparatus.

FIG. 11 is a diagram illustrating a system configuration for the abovecase. The system configuration includes: a visual inspection apparatus1101; a classification condition setting apparatus (classificationcondition setting means having a collection unit for collecting positioncoordinate information, and features, of defects over a large number ofdefects to store them in a storage device, the defects being acquiredfrom the feature extraction unit 110 of the visual inspection apparatus1101) 1102; and a review tool 1103. Each arrow indicates datainput/output.

The classification condition setting apparatus 1102 comprises thecollection unit (not illustrated), a defect sampling unit 115, and aclassification condition setting unit 116. The defect sampling unit 115includes a collection unit (not illustrated) for inputting and storingdefect ID, position coordinates and feature data which correspond to thedefect ID, being output from the visual inspection apparatus 1101, andan inspection image although it is not indispensable. Sampling of reviewdefects is performed by the same method as any of the methods describedin the first, second and third embodiments; and defect IDs, and positioncoordinates, of the review defects are output.

The review tool 1103 performs reviewing according to the positioncoordinates of the review defects, and then automatically classifies thedefects to output defect classes and review images, which are associatedwith defect IDs. The classification condition setting unit 116 isinputted the defect classes of the review defects by input means(including a bus and Internet), and learns the defect classes astraining samples in combination with corresponding feature data, andthen outputs classification conditions to the defect classification unit111 of the visual inspection apparatus 1101.

The classification condition setting unit 116 can also be configured toinput review images, and to allow manual classification. According tothis configuration, even if the review tool 1103 only acquires imagesand does not classify defects, classification condition settings becomepossible.

FIG. 12 is a diagram illustrating a defect training GUI for displayingreview images, and for manually classifying defects. Maps, which showdefect positions in a wafer and a die, are displayed in a wafer mapdisplay window 1201 and a die map display window 1202 respectively. Inan inspection image display window 1203, inspection images are displayedin each defect class and order of defect IDs. All defects are displayedwithout duplication in any of defect classes or in “unclassified”. Bydragging and dropping an image, it is possible to train (teach) a defectclass of a corresponding defect. What are displayed in an inspectioninformation detail display window 1204 includes: a defect image 1205 anda reference image 1206 that have been acquired for a selected defect bythe inspection apparatus; a defect image 1207 and a reference image 1208that have been acquired by the review tool; and a features list 1209. Adefect is selected by any of the following operation: clicking a defectpoint on the wafer map; clicking a defect point on the die map; andclicking an inspection image in the inspection image display window1203.

According to this method, it is also possible to train a defect class ofan unreviewed defect on the basis of an inspection image. If a judgmentcannot be made, the defect may be left in the “unclassified”. Therefore,it is possible to increase the number of training samples. As a result,correct classification condition settings become possible.

The present invention can be applied to a visual inspection apparatushaving an automatic defect classification function targeted for thinfilm devices including a semiconductor wafer, TFT, and a photo mask.

The invention may be embodied in other specific forms without departingfrom the spirit or essential characteristics thereof. The presentembodiment is therefore to be considered in all respects as illustrativeand not restrictive, the scope of the invention being indicated by theappended claims rather than by the foregoing description and all changeswhich come within the meaning and range of equivalency of the claims aretherefore intended to be embraced therein.

1. A visual inspection method, comprising the steps of: a collectionstep of detecting a large number of defect candidates as review defectsby using images acquired by imaging a sample substrate, calculatingfeature quantities of the large number of defect candidates detected bythe detecting and storing the calculated feature quantities of thedetected defect candidates; a defect sampling step of sampling thereview defects among the large number of defect candidates based on thecollected features of each defect candidates over the large number ofdefect candidates detected in the collection step a review step ofdistinguishing at least whether a defect candidate is a defect or not toa plurality of review defects by reviewing the review defects sampled inthe defect sampling step; a defect classifying condition determiningstep of determining a defect classifying condition from the result ofdistinguishing whether the defect candidate is a defect or not to aplurality of review defects at the review step.
 2. The visual inspectionmethod according to claim 1, wherein in said defect sampling step, adesired one-dimensional feature histogram over a large number of defectsis created as the defect feature distribution, and the sampling isperformed so that in the created desired one-dimensional featurehistogram, a number of samples from each of the sections into which thedesired one-dimensional feature histogram is divided with respect to thefeatures becomes roughly equal with sections where section in which thesampling defect does not exist is excluded.
 3. The visual inspectionmethod according to claim 2, wherein said defect sampling stepcomprises: creating a plurality of one-dimensional feature histograms asthe defect feature distribution; providing a visual display of theplurality of one-dimensional feature histograms on the display unit; andselecting the desired one-dimensional feature histogram from among theplurality of one-dimensional feature histograms displayed on the displayunit.
 4. The visual inspection method according to claim 1, wherein insaid defect sampling step, a desired two-dimensional feature space overa large number of defects is created as the defect feature distribution,and the sampling is performed so that in the created desiredtwo-dimensional feature space, which is divided into cells of a latticewith respect to the features, a number of samples included in each cellof the lattice becomes roughly equal with cells of the lattice where acell of the lattice in where the sampling defect does not exist isexcluded.
 5. The visual inspection method according to claim 4, whereinsaid defect sampling step comprises: creating a plurality of featurescatter diagrams as the defect feature distribution; displaying theplurality of feature scatter diagrams on the display unit; and selectingthe desired two-dimensional feature space from among the plurality offeature scatter diagrams displayed on the display unit.
 6. The visualinspection method according to claim 4, wherein said desiredtwo-dimensional feature space is obtained through conversion ofthree-dimensional feature space or more into two-dimensional featurespace by compression.
 7. The visual inspection method according to claim1, wherein said defect sampling step comprises: creating a plurality offeature histograms over a large number of defects as the defect featuredistribution; providing a visual display of the plurality of featurehistograms on the display unit; and selecting one feature histogram fromamong the plurality of feature histograms displayed on the display unit,and performing sampling so that a number of samples from each of thefeature sections which have been freely set in said selected one of thefeature histograms becomes roughly equal with feature sections wherefeature section in which the sampling defect does not exist is excluded.8. The visual inspection method according to claim 1, wherein thecollected features of each defect from said collection step includefeatures based on defect images, and features based on positioncoordinates of defects.
 9. A visual inspection apparatus, comprising: animaging unit which acquires an image of a sample substrate; a defectcandidate detecting unit which detects defect candidates from the imageof the sample acquired by the imaging unit; a feature quantitycalculating unit which calculates feature quantities of the large numberof defect candidates detected by the defect candidate detecting unit; acollection unit which collects the feature quantities of the detecteddefect candidates calculated by the feature quantity calculating unit; adefect sampling unit which performs sampling of the review defects amongthe large number of defect candidates based on the collected features ofeach defect candidates over the large number of defect candidates storedby the collection unit; a review unit which distinguishes at leastwhether a defect candidate is a defect or not to a plurality of reviewdefects by reviewing the review defects sampled by the defect samplingunit; and a defect classifying condition determining unit whichdetermines a defect classifying condition from the result ofdistinguishing whether the defect candidate is a defect or not to aplurality of review defects by the review unit.
 10. The visualinspection apparatus according to claim 9, wherein said defect samplingunit creates a desired one-dimensional feature histogram over a largenumber of defects as a defect feature distribution, and performssampling so that in the created desired one-dimensional featurehistogram, a number of samples from each of the sections into which thedesired one-dimensional feature histogram is divided with respect to thefeatures becomes roughly equal with sections where section in which thesampling defect does not exist is excluded.
 11. The visual inspectionapparatus according to claim 10, wherein said defect sampling unitcomprises: creating section which creates a plurality of one-dimensionalfeature histograms as the defect feature distribution; a display whichdisplays the plurality of one-dimensional feature histograms on ascreen; and a selecting section which selects the desiredone-dimensional feature histogram from among the plurality ofone-dimensional feature histograms displayed on the screen of thedisplay.
 12. The visual inspection apparatus according to claim 9,wherein said defect sampling unit creates a desired two-dimensionalfeature space over a large number of defects as the defect featuredistribution and performs sampling so that in the created desiredtwo-dimensional feature space, which is divided into cells of a latticewith respect to the features, a number of samples included in each cellof the lattice becomes roughly equal with cells of the lattice where acell of the lattice in where the sampling defect does not exist isexcluded.
 13. The visual inspection apparatus according to claim 12,wherein said defect sampling unit comprises: a creating section whichcreates a plurality of feature scatter diagrams as the defect featuredistribution; a display which displays the plurality of feature scatterdiagrams on a screen; and a selecting section which selects the desiredtwo-dimensional feature space from among the plurality of featurescatter diagrams displayed on the screen of the display.
 14. The visualinspection apparatus according to claim 12, wherein said the defectsampling unit creates the desired two-dimensional feature space byconverting three-dimensional feature space or more into two-dimensionalfeature space by compression.
 15. The visual inspection apparatusaccording to claim 9, wherein said defect sampling unit comprises: afeature histogram creating section which creates a plurality of featurehistograms over a large number of defects as the defect featuredistribution; a display which displays the plurality of featurehistogram on a screen; and a selecting section which selects one featurehistogram from among the plurality of feature histograms displayed onthe screen of the display, and performs sampling so that a number ofsamples from each of the feature sections which have been freely set insaid selected one of the feature histograms becomes roughly equal withfeature sections where feature section in which the sampling defect doesnot exist is excluded.
 16. The visual inspection apparatus according toclaim 9, wherein the features collected by said collection from eachdefect include features based on defect images, and features based onposition coordinates of defects.
 17. An image processing method,comprising the steps of: a collection step of detecting a large numberof defect candidates as review defects by using images acquired byimaging a sample substrate, calculating feature quantities of the largenumber of defect candidates detected by the detecting and storing thecalculated feature quantities of the detected defect candidates; adefect sampling step of sampling the review defects among the largenumber of defect candidates based on the collected features of eachdefect candidates over the large number of defect candidates detected inthe collection step; a review step of distinguishing at least whether adefect candidate is a defect or not from a plurality of review defectsby reviewing the review defects sampled in the defect sampling step; anda defect classifying condition determining step of determining a defectclassifying condition from the result of distinguishing whether thedefect candidate is a defect or not from a plurality of review defectsat the review step.
 18. The image processing method according to claim17, wherein in said defect sampling step, a desired n-dimensionalfeature histogram over a large number of defects is created as thedefect feature distribution, and the sampling is performed so that inthe created desired n-dimensional feature histogram, a number of samplesfrom each of the sections into which the desired n-dimensional featurehistogram is divided with respect to the features becomes roughly equalwith sections where section in which the sampling defect does not existis excluded.
 19. The image processing method according to claim 17,wherein said defect sampling step comprises: creating a plurality ofone-dimensional feature histograms as the defect feature distribution;providing a visual display of the plurality of one-dimensional featurehistograms on the display unit; and selecting the desiredone-dimensional feature histogram from among the plurality ofone-dimensional feature histograms displayed on the display unit. 20.The image processing method according to claim 17, wherein in saiddefect sampling step, creating a two-dimensional feature space based onplural feature quantities calculated in the collection step, and saidtwo-dimensional feature space is obtained through conversion ofthree-dimensional feature space or more into two-dimensional featurespace by compression.